# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(collidingmice)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

list(APPEND CMAKE_FIND_ROOT_PATH ${QT_PREFIX})
add_library(collidingmice SHARED main.cpp mouse.h mouse.cpp mice.qrc)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
target_link_libraries(collidingmice PRIVATE Qt${QT_VERSION_MAJOR}::Core
                                            Qt${QT_VERSION_MAJOR}::Gui
                                            Qt${QT_VERSION_MAJOR}::Widgets
                                            Qt${QT_VERSION_MAJOR}::QOpenHarmonyPlatformIntegrationPlugin
                                            Qt${QT_VERSION_MAJOR}::QJpegPlugin
)